package com.ideal.frame.application.repository;

import com.ideal.frame.application.entity.ApplicationSecret;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * @Author ybb
 * @Description
 * @Date 2021/8/24 18:20
 */
@Repository
public interface ApplicationUserRepository extends JpaRepository<ApplicationSecret, Long>,
        JpaSpecificationExecutor<ApplicationSecret> {

    @Modifying
    @Query(value = "DELETE FROM application_key_tb   WHERE app_key = :key",nativeQuery = true)
    int deleteSecret(@Param("key")String  key);

}
